﻿using System;

namespace judgePrime
{
    internal class Program
    {    
        static void Main(string[] args)
        {
            isPrime iP = new isPrime();
            int num;
            num = Convert.ToInt32(Console.ReadLine());
            int ans = 0;
            for (int i = 0; i < num; i++)
            {
                if (iP.isPrimeNum(i))
                    ans++;
            }

            Console.WriteLine(ans);
        }
    }
}